// /mock/course.js(模块中的模拟数据的创建)
const Mock = require('mockjs')
const list = []
const type = ['varchar', 'bigint', 'text', 'attach', 'fltno', 'plane_point', 'location', 'staff', 'dept', 'date', 'datetime'];

for (var i = 0; i < 11; i++) {
  list.push(Mock.mock({
    'fieldId|+1': 23123,
    'type|+1': type,
    'title': '@ctitle(4)',
    isdict: 0
  }));
}
list.push({ fieldId: 23222, type: 'usetypecode_dict', isdict: 1, title: '字典' })

var dataStr = JSON.parse('{"attach":"a28cec5905d011eeb4c6908d6e607a4a","title":"3452345234","reportUser":8,"reportTime":"2023-06-08 15:46:05","phone":"asdfsdfgsdf","receiveDept":"159,161","copyDept":"111,128","findTime":"2023-06-08 15:46:17","location":"fghdfghf","deaNum":"12","eventBrief":"sdff","initialReason":"dfgsdfgsdf","basicProcess":"dfgsdfgsdf","coverage":"dfgsdfasdfa","development":"dfasdfasd","disposalStatus":"处置情况\\n","requestThings":"请求事项\\n","suggestion":"工作建议\\n","fltno":"MU9637","tude":"118.786154,32.057778"}');


module.exports = [
  {
    url: '/mocks/events/fields',
    type: 'get',
    response: () => {
      return {
        code: 200,
        data: list
      }
    }
  },
  {
    url: '/mocks/events/info',
    type: 'get',
    response: () => {
      return {
        code: 200,
        data: dataStr
      }
    }
  }
]
